<template>
  <div class="home">
    <div class="header">
      <span class="title">信雅达互联网智能信贷系统</span>
    </div>
    <el-container style="height: 100%; border: 1px solid #eee">
      <el-aside style="background-color: rgb(238, 241, 246)">
        <el-menu router>
          <template v-for="(item,index) in $router.options.routes" v-if="item.menuShow">
            <el-submenu :index="index+''" v-if="!item.leaf">
              <template slot="title">{{item.name}}</template>
              <el-menu-item v-for="child in item.children" :index="child.path" :key="child.path" v-if="!child.hidden">{{child.name}}</el-menu-item>
            </el-submenu>
            <el-menu-item v-if="item.leaf&&item.children.length>0" :index="item.children[0].path">
              {{item.children[0].name}}
            </el-menu-item>
          </template>
        </el-menu>
      </el-aside>
      <el-col>
        <section class="content-container">
            <el-col :span="24">
              <transition name="fade" mode="out-in">
              </transition>
            </el-col>
            <router-view class="router-view"></router-view>
          </section>
        </el-col>
      </el-container>
    </div>
  </template>

  <script>
  export default {
    name: 'Home',
    data () {
      return {
        item: []
      }
    },
    components: {
    }
  }
  </script>

  <style>

  .header{
    height: 80px;
    background-color: #409EFF;
  }

  *{
    margin: 0px;
  }

  .title{
    float: left;
    margin-top: 25px;
    margin-left: 40px;
    color: white;
    font-size: 20px
  }

  .el-aside {
    color: #333;
  }

  </style>
